﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RPGProject.GameWorld;
using RPGProject.GameWorld.GameObjects;
namespace RPGProject.LoopSystem
{
    class WorldFrameLooper : Loop
    {
        private World world;
        public WorldFrameLooper(World w, LoopManager lm)
            : base(lm)
        {
            this.world = w;
        }
        public override FuncType RunOnce()
        {
            this.world.Listen(new GameObjectEvent("frame"));
            this.world.Render();
            return FuncType.ADD_TO_END;
        }
    }
}
